﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class SiteMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        FormsAuthenticationTicket tmpFAT = new FormsAuthenticationTicket(HttpContext.Current.User.Identity.Name, false, 11);
        FormsIdentity tmoFI = new FormsIdentity(tmpFAT);

        if (Request.IsAuthenticated)
        {

        }
        else
        {
            FormsAuthentication.SignOut();
        }
    }
    protected void AuthStatus_Click(object sender, EventArgs e)
    {
        if (Request.IsAuthenticated)
        {
            FormsAuthentication.SignOut();

            Response.Redirect("~/Default.aspx");
        } 
    }
}
